package com.kyivmohyla.kma2.model;

import com.google.gwt.user.client.rpc.IsSerializable;

public class Refs implements IsSerializable {
    private int serviceId;
    private int equipmentId;

    public Refs() {
    }

    public int getServiceId() {
        return serviceId;
    }

    public void setServiceId(int serviceId) {
        this.serviceId = serviceId;
    }

    public int getEquipmentId() {
        return equipmentId;
    }

    public void setEquipmentId(int equipmentId) {
        this.equipmentId = equipmentId;
    }

    @Override
    public boolean equals(Object other) {
        return (other instanceof Refs) ? serviceId == ((Refs) other).serviceId
                && equipmentId == ((Refs) other).equipmentId : (other == this);
    }

    @Override
    public int hashCode() {
        return this.getClass().hashCode();
    }

    @Override
    public String toString() {
        return String.format("Refs(serviceId = %d, equipmentId = %d)",
                serviceId, equipmentId);
    }
}